home *** CD-ROM | disk | FTP | other *** search
- procedure BORDER (Surf, Color: integer);
-
- { Draw the border of surface #Surf in color Color }
- var Vert: integer; { vertex # being plotted }
- Node1: integer; { first node of line }
- Node2: integer; { second node of line }
- Pcolor: integer; { actual color used }
- begin
- {$ifdef BIGMEM}
- with ptrd^ do with ptre^ do with ptrh^ do
- begin
- {$endif}
- { Make sure the color is legitimate }
- if (Color > Ncolors) then
- Pcolor := Ncolors
- else
- Pcolor := Color;
- for Vert := 1 to Nvert[Surf]-1 do begin
- Node1 := Konnec (Surf, Vert);
- Node2 := Konnec (Surf, Vert+1);
- gdraw (round(Xtran[Node1]), round(Ytran[Node1]),
- round(Xtran[Node2]), round(Ytran[Node2]), Pcolor);
- end;
-
- { One last draw to close the polygon }
- Node1 := Konnec (Surf, Nvert[Surf]);
- Node2 := Konnec (Surf, 1);
- gdraw (round(Xtran[Node1]), round(Ytran[Node1]),
- round(Xtran[Node2]), round(Ytran[Node2]), Pcolor);
- {$ifdef BIGMEM}
- end; {with}
- {$endif}
- end; { procedure BORDER }